package com.mk.cloud.common.domain;
import org.beetl.sql.core.annotatoin.AssignID;
import org.beetl.sql.core.annotatoin.Param;
import org.beetl.sql.core.mapper.BaseMapper;

import javax.persistence.Transient;
import java.io.Serializable;
import java.math.*;
import java.util.Date;
import java.sql.Timestamp;
import java.util.List;

/*
* 
* gen by beetlsql 2018-04-13
*/
public class PWechatMenus   implements Serializable{
	//主键
	@AssignID
	private String wmid ;
	//父id
	private String pwmid;
	//排序
	private Integer orderby ;
	//所属企业
	private String coid ;
	//是否显示（0否，1是）
	private String isshow ;
	//菜单名称
	private String wmname ;
	//链接地址
	private String wmurl ;
	//列表展示方式:列表0~列表5
	private String showtype;
	//展示位置(0-首页,1-体验)
	private String showplace;
	@Transient
	//所属企业
	private String coname ;

	public PWechatMenus() {
	}

	public String getShowplace() {
		return showplace;
	}

	public void setShowplace(String showplace) {
		this.showplace = showplace;
	}

	public String getShowtype() {
		return showtype;
	}

	public void setShowtype(String showtype) {
		this.showtype = showtype;
	}

	public String getConame() {
		return coname;
	}

	public void setConame(String coname) {
		this.coname = coname;
	}

	public String getPwmid() {
		return pwmid;
	}

	public void setPwmid(String pwmid) {
		this.pwmid = pwmid;
	}

	public String getWmid(){
		return  wmid;
	}
	public void setWmid(String wmid ){
		this.wmid = wmid;
	}
	
	public Integer getOrderby(){
		return  orderby;
	}
	public void setOrderby(Integer orderby ){
		this.orderby = orderby;
	}
	
	public String getCoid(){
		return  coid;
	}
	public void setCoid(String coid ){
		this.coid = coid;
	}
	
	public String getIsshow(){
		return  isshow;
	}
	public void setIsshow(String isshow ){
		this.isshow = isshow;
	}
	
	public String getWmname(){
		return  wmname;
	}
	public void setWmname(String wmname ){
		this.wmname = wmname;
	}
	
	public String getWmurl(){
		return  wmurl;
	}
	public void setWmurl(String wmurl ){
		this.wmurl = wmurl;
	}

	public interface Mapper extends BaseMapper<PWechatMenus> {
		/**
		 * 查询前一个
		 * @param coid
		 * @param orderby
		 * @return
		 */
		PWechatMenus selectPreMenu(@Param("coid")String coid,@Param("orderby") Integer orderby);

		/**
		 * 查询后一个
		 * @param coid
		 * @param orderby
		 * @return
		 */
		PWechatMenus selectNextMenu(@Param("coid")String coid,@Param("orderby") Integer orderby);

		/**
		 * 查询最大的排序号
		 * @param coid
		 * @return
		 */
		Integer selectMaxOrderby(@Param("coid")String coid);

		/**
		 * 更新企业已有的菜单的url
		 * @param coid
		 * @return
		 */
		Integer updateOrInsertMenus(@Param("coid")String coid);

		/**
		 * 查询coid没有的所有菜单
		 * @param coid
		 * @return
		 */
		List<PWechatMenus> selectAllNewMenus(@Param("coid")String coid);
	}



}
